<?php
if(isset($_POST["dni"]))
    {
        require_once("Image/Barcode.php");

        $num = $_POST["dni"];
        $type = 'code128';
        $imgtype = 'png';
//        $num = isset($_REQUEST['num']) ? $_REQUEST['num'] : $_POST["dni"];
//        $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'code128';
//        $imgtype = isset($_REQUEST['imgtype']) ? $_REQUEST['imgtype'] : 'png';

        Image_Barcode::draw($num, $type, $imgtype);
    }
?>
<h1>EAC 6 Exercici 1</h1>
<h2>prova amb mercurial</h2>
<form action="provar.php" method="post" >
    DNI: <input type="text" name="dni"/>
    <input type="submit"/>
</form>
